/**
 * FileName: webpack配置文件
 * Created Date: 2022-10-13 16:34:47
 * Author: 文初阳
 * -----
 * Last Modified: 2022-10-13 16:34:47
 * Modified By: 文初阳
 */
module.exports = {
    module: {
        rules: [
            // ...
            // --------
            // SCSS ALL EXCEPT MODULES
            {
                test: /\.scss$/i,
                exclude: /\.module\.scss$/i,
                use: [
                    {
                        loader: 'style-loader',
                    },
                    {
                        loader: 'css-loader',
                        options: {
                            importLoaders: 1,
                            modules: {
                                mode: 'icss',
                            },
                        },
                    },
                    {
                        loader: 'sass-loader',
                    },
                ],
            },
            // --------
            // SCSS MODULES
            {
                test: /\.module\.scss$/i,
                use: [
                    {
                        loader: 'style-loader',
                    },
                    {
                        loader: 'css-loader',
                        options: {
                            importLoaders: 1,
                            modules: {
                                mode: 'local',
                            },
                        },
                    },
                    {
                        loader: 'sass-loader',
                    },
                ],
            },
        ],
    },
};
